<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<img src="pic_bulboff.gif" id="mying">
		<script>
			//*实现效果：点击图片；切换图片*/
			//步骤1、找到html元素对象，2、改变元素对象(修改src)
			var myimg=document.getElementById('mying');
	myimg.onclick=function(){
		if(myimg.src.indexOf('off')!=-1){
			myimg.src="pic_bulbon.gif"
		}else{
			myimg.src="pic_bulboff.gif"
		}
		
	};
		</script>
	</body>
</html>
